﻿using System;

namespace TestMonkey.Models
{
	public class TestModel
	{
		readonly Type m_Type;
		readonly Setup m_Setup;

		public TestModel(Setup setup, Type type)
		{
			m_Setup = setup;
			m_Type = type;
		}

		public CodeString Namespace
		{
			get
			{
				string temp = m_Setup.TestNamespace + "." + m_Setup.GetPartialNamespace(m_Type);
				if (temp.StartsWith("."))
					temp = temp.Substring(1);
				if (temp.EndsWith("."))
					temp = temp.Substring(0, temp.Length - 1);
				return temp;
			}
		}

		public CodeString ClassName
		{
			get { return m_Type.Name + "Tests"; }
		}

	}
}
